Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make exists, found, not_found consistent #4480

Closed
clintongormley opened this issue Dec 17, 2013 · 4 comments
Closed

Make exists, found, not_found consistent #4480

clintongormley opened this issue Dec 17, 2013 · 4 comments

Comments

@clintongormley
Copy link

The GET and multi_get APIs return {"exists": true|false} while the DELETE and bulk delete APIs return {"found": true|false}, and the DeleteResponse class uses notFound.

All of these should be changed to use found, in order to make things more consistent.

@dadoonet
Copy link
Member

If we look at the discussion here: #4416 (comment)
We could think of having a status: 404 or status: 200?

WDYT?

@ghost ghost assigned dakrone Jan 2, 2014
@kimchy
Copy link
Member

kimchy commented Jan 2, 2014

I don't think we should do status here, the status is already returned in the response, and for the non error use case, its much nicer to be descriptive, yet in a consistent manner.

@kimchy
Copy link
Member

kimchy commented Jan 2, 2014

also, I would add that the index action should have a "created" flag in the rest response.

@dakrone
Copy link
Member

dakrone commented Jan 7, 2014

Merged in 2cb40fc

@dakrone dakrone closed this as completed Jan 7, 2014
karmi added a commit to elastic/elasticsearch-ruby that referenced this issue Jan 8, 2014
This change reflects the background-incompatible change from
elastic/elasticsearch#4480

Related: d540aa6
javanna added a commit that referenced this issue Jan 16, 2014
 - Removed "ok": true from response examples
 - Added "created" flag to index response examples
 - Replaced exists flag with found in delete response examples
brusic pushed a commit to brusic/elasticsearch that referenced this issue Jan 19, 2014
 - Removed "ok": true from response examples
 - Added "created" flag to index response examples
 - Replaced exists flag with found in delete response examples
picandocodigo pushed a commit to elastic/elastic-transport-ruby that referenced this issue Jun 7, 2021
This change reflects the background-incompatible change from
elastic/elasticsearch#4480

Related: d540aa6
renaperes824 added a commit to renaperes824/ruby-elastic-transport that referenced this issue Sep 12, 2022
This change reflects the background-incompatible change from
elastic/elasticsearch#4480

Related: d540aa6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants